<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Foundation\Auth\User as Authenticatable;


class AdminUser extends Authenticatable implements JWTSubject
{
    use HasFactory;

    const STATUS_NORMAL = 'normal';
    const STATUS_FORZEN = 'forzen';

    public static $statusMap = [
        self::STATUS_NORMAL => '正常',
        self::STATUS_FORZEN => '冻结',
    ];

    protected $rememberTokenName = 'admin_remember_token';

    protected $fillable = [
        'username', 'phone', 'email', 'password', 'avatar', 'status'
    ];

    public function getJWTIdentifier()
    {
        return $this->getKey();
    }

    public function getJWTCustomClaims()
    {

        return [];
    }

}
